<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta name="description" content="">
    <meta http-equiv="x-dns-prefetch-control" content="on">

    <title>选择支付方式</title>
    <link href="../../css/css.css" rel="stylesheet" type="text/css">
    <script src="../../js/jquery-v1.11.2.min.js"></script>
    <script src="../../js/common.js"></script>
    <script src="../../js/driver.js"></script>
</head>
<body>
<section class="mt10 itemgroup p15" id="payDetail">

</section>
<input type="hidden" id="paymentType" name="paymentType" value=""/>
</body>
<script>
$(function (){
	 //token验证
		checkDriverToken();
	}); 
$(function(){
	var LocString = String(window.document.location.href); 
	var waybillId=GetArgsFromHref("waybillId"); 
	var paymentType=GetArgsFromHref("paymentType"); 
	 var url = _global.serverHost +"/consignerOrderManger/selectPay.htm";
	 var customerUuid=getCookie("driverUuid");
     var data = {
    		 'waybillId':waybillId,
    		 "paymentType":paymentType,
    		 'customerUuid':customerUuid
     };
     _callAjaxRequest(url, data, callBack);

     function callBack(data) {
    	 var payDetail='';
    	 var waybillId=data.waybillId;
    	 var paymentType=data.paymentType;
    	 payDetail=payDetail+' <div class="payitem" onclick="makesurePayType('+waybillId+',\'10\')">'
    	 +'<img src="../../img/pay_wechat.png" class="pay_ico"/>'
    	 +' 微信支付';
    	 if(paymentType=='10'){
    		 payDetail=payDetail+'<i class="iconfont rightsmallicon_red">&#xe6da;</i>';
    	 }
    	 payDetail=payDetail+' </div>';
           
       
    	 payDetail=payDetail+' <div class="payitem" onclick="makesurePayType('+waybillId+',\'20\')">'
    	 +' <img src="../../img/pay_alipay.png" class="pay_ico"/>'
    	 +'支付宝支付';
    	 if(paymentType=='20'){
    		 payDetail=payDetail+'<i class="iconfont rightsmallicon_red">&#xe6da;</i>';
    	 }
             
    	 payDetail=payDetail+' </div>';
    	 payDetail=payDetail+' <div class="payitem" onclick="makesurePayType('+waybillId+',\'80\')">'
    	 +'<img src="../../img/pay_money.png" class="pay_ico"/>'
    	 +' 现金支付'
    	 if(paymentType=='80'){
    		 payDetail=payDetail+'<i class="iconfont rightsmallicon_red">&#xe6da;</i>';
    	 }
    	 payDetail=payDetail+' </div>';
    	 $("#payDetail").html(payDetail);
    	 
     }
})

 function makesurePayType(waybillId,paymentType){
	var customerUuid=getCookie("customerUuid");
	 //window.location.href="${pageContext.request.contextPath}/consignerOrderManger/orderFeeDetail.htm?waybillId="+waybillId+"&paymentType="+paymentType;
	 window.location.href="ok_bid.html?waybillId="+waybillId+"&paymentType="+paymentType+"&customerUuid="+customerUuid;
 }


</script>
</html>